package com.sunyard.dal.mapper;

import com.sunyard.dal.entity.Finger;
import com.sunyard.dal.entity.FingerVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface FingerMapper {
    /**
     * delete by primary key
     *
     * @param id primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(Integer id);

    /**
     * insert record to table
     *
     * @param record the record
     * @return insert count
     */
    int insert(Finger record);

    /**
     * insert record to table selective
     *
     * @param record the record
     * @return insert count
     */
    int insertSelective(Finger record);

    /**
     * select by primary key
     *
     * @param id primary key
     * @return object by primary key
     */
    Finger selectByPrimaryKey(Integer id);

    FingerVo selectById(Integer id);

    /**
     * update record selective
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(Finger record);

    /**
     * update record
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(Finger record);

    /**
     * getLastId
     *
     * @return Finger
     * @author: guangw.dang
     * @Date: 2022/7/13 14:24
     **/
    int getLastId();

    /**
     * 获取指定用户对应的指纹列表
     *
     * @param opId [opId]
     * @return List<Finger>
     * @author: guangw.dang
     * @Date: 2022/7/13 14:52
     **/
    List<Finger> getFingerByOpId(String opId);

    /**
     * 通过指纹累心查询指纹信息
     *
     * @param opId
     * @param type [opId, type]
     * @return Finger
     * @author: guangw.dang
     * @Date: 2022/7/13 15:48
     **/
    Finger getFingerByType(@Param("opId") String opId, @Param("type") String type);

    List<Finger> getBatchFingerByOpId(@Param("opIds") String[] opIds);

    List<Finger> getFingers();

}